package TEST;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class test2 {
    public static void main(String[] args) {
        /* 班级里有N个学生
        要求：
        70%的概率随机到男生
        30%的概率随机到女生

        "范闲","范建","范统","杜子腾","宋合泛","侯笼藤","朱益群","朱穆朗玛峰",
        "杜琦燕","袁明媛","李猜","田蜜蜜",
        */

        ArrayList<Integer> list=new ArrayList<>();
        ArrayList<String> manlist=new ArrayList<>();
        ArrayList<String> girllist=new ArrayList<>();
        Collections.addAll(manlist,"范闲","范建","范统","杜子腾","宋合泛","侯笼藤","朱益群","朱穆朗玛峰");
        Collections.addAll(girllist,"杜琦燕","袁明媛","李猜","田蜜蜜");
        Collections.addAll(list,1,1,1,1,1,1,1,0,0,0);
        Collections.shuffle(list);
        System.out.println(list);
        Integer i = list.get(0);
        if(i==0){
            Collections.shuffle(girllist);
            System.out.println(girllist.get(0));
        }
        else {
            Collections.shuffle(manlist);
            System.out.println(manlist.get(0));
        }
    }
}
